.class Lcom/example/m6wmr/wxapi/WXEntryActivity$5;
.super Ljava/lang/Thread;
.source "WXEntryActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/wxapi/WXEntryActivity;->get(Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

.field private final synthetic val$code:Ljava/lang/String;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/wxapi/WXEntryActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    iput-object p2, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->val$code:Ljava/lang/String;

    .line 478
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 9

    .prologue
    .line 480
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 483
    new-instance v7, Ljava/lang/StringBuilder;

    iget-object v8, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    iget-object v8, v8, Lcom/example/m6wmr/wxapi/WXEntryActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v8}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 484
    const-string v8, "/index.php?ctrl=app&action=wxinfo&code="

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->val$code:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "&datatype=json"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 483
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 485
    .local v5, "url":Ljava/lang/String;
    const-string v7, "get>>>>>>>>>>>>>>>>>>>>"

    invoke-static {v7, v5}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 486
    iget-object v7, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    iget-object v7, v7, Lcom/example/m6wmr/wxapi/WXEntryActivity;->m:Lmyapp/MyApp;

    invoke-static {v5, v7}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v4

    .line 487
    .local v4, "str":Ljava/lang/String;
    iget-object v7, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    invoke-static {v7, v4}, Lcom/example/m6wmr/wxapi/WXEntryActivity;->access$11(Lcom/example/m6wmr/wxapi/WXEntryActivity;Ljava/lang/String;)V

    .line 488
    const-string v7, "get>>>>>>>>>>>>>>>>>>>>"

    invoke-static {v7, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 489
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 492
    .local v2, "msg":Landroid/os/Message;
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v4}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 494
    .local v1, "json":Lorg/json/JSONObject;
    const-string v7, "error"

    invoke-virtual {v1, v7}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    const-string v8, "true"

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 497
    const-string v7, "msg"

    invoke-virtual {v1, v7}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    iput-object v7, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 498
    const/4 v7, 0x1

    iput v7, v2, Landroid/os/Message;->arg1:I

    .line 499
    iget-object v7, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    # getter for: Lcom/example/m6wmr/wxapi/WXEntryActivity;->h:Landroid/os/Handler;
    invoke-static {v7}, Lcom/example/m6wmr/wxapi/WXEntryActivity;->access$12(Lcom/example/m6wmr/wxapi/WXEntryActivity;)Landroid/os/Handler;

    move-result-object v7

    invoke-virtual {v7, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 521
    .end local v1    # "json":Lorg/json/JSONObject;
    :cond_0
    :goto_0
    return-void

    .line 502
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_1
    const-string v7, "msg"

    invoke-virtual {v1, v7}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v6

    .line 503
    .local v6, "weixin":Lorg/json/JSONObject;
    const-string v7, "phone"

    invoke-virtual {v6, v7}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 504
    .local v3, "phone":Ljava/lang/String;
    iget-object v7, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    const-string v8, "openid"

    invoke-virtual {v6, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    iput-object v8, v7, Lcom/example/m6wmr/wxapi/WXEntryActivity;->openid:Ljava/lang/String;

    .line 505
    const-string v7, ""

    invoke-virtual {v3, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_0

    .line 508
    const/16 v7, 0xf

    iput v7, v2, Landroid/os/Message;->arg1:I

    .line 509
    iget-object v7, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    # getter for: Lcom/example/m6wmr/wxapi/WXEntryActivity;->h:Landroid/os/Handler;
    invoke-static {v7}, Lcom/example/m6wmr/wxapi/WXEntryActivity;->access$12(Lcom/example/m6wmr/wxapi/WXEntryActivity;)Landroid/os/Handler;

    move-result-object v7

    invoke-virtual {v7, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 513
    .end local v1    # "json":Lorg/json/JSONObject;
    .end local v3    # "phone":Ljava/lang/String;
    .end local v6    # "weixin":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 515
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 516
    const/16 v7, 0xc

    iput v7, v2, Landroid/os/Message;->arg1:I

    .line 518
    iget-object v7, p0, Lcom/example/m6wmr/wxapi/WXEntryActivity$5;->this$0:Lcom/example/m6wmr/wxapi/WXEntryActivity;

    # getter for: Lcom/example/m6wmr/wxapi/WXEntryActivity;->h:Landroid/os/Handler;
    invoke-static {v7}, Lcom/example/m6wmr/wxapi/WXEntryActivity;->access$12(Lcom/example/m6wmr/wxapi/WXEntryActivity;)Landroid/os/Handler;

    move-result-object v7

    invoke-virtual {v7, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 526
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 527
    monitor-exit p0

    return-void

    .line 526
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
